<!DOCTYPE HTML>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no,email=no,date=no,aItemress=no">
	<title>我的收藏</title>
	<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
	<link rel="stylesheet" type="text/css" href="../../css/app.css" />
	<style type="text/css">
		body {
			background-color: #f5f5f5;
		}

		.aui-tab-item {
			height: 2.5rem;
			line-height: 2.5rem;
			font-size: 0.8rem;
		}

		.aui-tab {
			/*box-shadow: 0 0 1rem #e6e6e6;*/
		}

		.pintuan-list-goods {
			height: 6.5rem;
			display: flex;
			flex-wrap: row;
			justify-content: flex-start;
			align-items: flex-start;
			padding-top: 0.8rem;
		}

		.pintuan-list-goods-img {
			width: 5rem;
			margin-right: 0.7rem;
		}

		.pintuan-price {
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: flex-end;
			margin-top: 0.3rem;
		}

		.pintuan-list-goods-infor {
			flex: 1;
		}

		.goods-tag {
			color: #FF6642;
			font-size: .5rem;
			border: 1px solid #FF6642;
			border-radius: .1rem;
			white-space: nowrap;
			margin-top: .55rem;
			margin-right: .25rem;
			display: inline-block;
			height: .8rem;
			line-height: .8rem;
			padding: 0 .1rem;
		}
		/*孝讯*/

		.ming-card-list {
			background-color: #FFFFFF;
			padding: 0.5rem;
			padding-top: 1rem;
			margin-bottom: 0.5rem;
		}

		.ming-card-list-header {
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
			margin-bottom: 0.5rem;
		}

		.ming-card-list-header-avatar img {
			width: 1.7rem;
			border-radius: 50%;
		}

		.ming-card-list-header-userinfo {
			flex: 1;
			margin-left: 0.5rem;
		}

		.ming-card-list-content {
			display: inline-block;
			width: 88%;
			margin-left: 12%;
			font-size: .8rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(34, 34, 34, 1);
		}

		.ming-card-list-content-img {
			padding-top: 1rem;
			padding-bottom: 1rem;
		}

		.ming-card-list-content-img img {
			border-radius: 5px;
		}

		.ming-card-list-content-img .aui-row .aui-col-xs-4 {
			padding: 0 0.25rem;
		}

		.ming-card-list-footer {
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
			padding-top: 0.5rem;
			margin: 0 1.4rem;
		}

		.ming-card-list-footer img {
			width: 1.1rem;
			display: inline-block;
			vertical-align: middle;
		}

		.aui-text-linear span {
			position: relative;
			background: linear-gradient(-152deg, #ee02fd, #9972e6);
			background: -webkit-linear-gradient(-152deg, #ee02fd, #9972e6);
			color: #72D5EF;
			-webkit-background-clip: text;
			-webkit-text-fill-color: #72D5EF;
			border-bottom: .1rem solid #72D5EF;
			padding: 0 .2rem 0 .2rem;
		}

		.aui-ellipsis-2 {
			display: -webkit-box;
			overflow: hidden;
			text-overflow: ellipsis;
			word-wrap: break-word;
			word-break: break-all;
			white-space: normal !important;
			-webkit-line-clamp: 2;
			-webkit-box-orient: vertical;
		}
		/*改写*/

		.circle_tab {
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 0.6rem 1.1rem 0 1.1rem;
			font-size: 0.75rem!important;
			font-family: PingFangSC-Regular!important;
			font-weight: 400!important;
			color: rgba(34, 34, 34, 1)!important;
			border-bottom: 0.05rem solid rgba(238, 238, 238, 0.5);
		}

		.circle_tab_item {
			padding: 0 0.5rem 0.4rem 0.5rem;
		}

		.active_active_tab {
			font-family: PingFangSC-Medium;
			font-weight: 500;
			color: rgba(114, 213, 239, 1);
			border-bottom: 0.1rem solid rgba(114, 213, 239, 1);
			border-radius: 0.05rem;
		}

		.new_wraper {
			
		}

		.newproduct_left {
			background: url();
			background-repeat: no-repeat;
			background-size: auto 0.8rem;
			background-position: left center;
			padding-left: 10px;
			display: inline-block;
			font-size: 0.85rem;
			font-family: PingFangSC-Semibold;
			font-weight: 600;
			color: rgba(51, 51, 51, 1);
		}

		.newproduct_right span {
			font-size: 0.65rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(102, 102, 102, 1);
		}

		.newproduct_list {
			/*height: 6.75rem;*/
			background: rgba(255, 255, 255, 1);
			padding: 0.5rem 0.5rem ;
			display: flex;
			/*box-sizing: border-box;*/
			/* padding-top: 0.75rem; */
			border-radius:8px;
			margin: 0.5rem;
			justify-content: flex-start;
			
		}

		.left_img {
			width: 5rem;
			margin-right: 0.75rem;
			height: 5rem;
		}

		.left_img img {
			width: 5rem;
			border-radius: 0.2rem;
			height: 5rem;
		}

		.right_cont {
			width: 12rem;
			
			/* border-bottom: .05rem solid rgba(238, 238, 238, 0.5); */
		}

		.top_title {
			/* width: 10rem; */
			/*border: 1px solid black;*/
			margin-bottom:0.2rem
		}

		.top_title img {
			width: 1.6rem;
			height: 0.9rem;
			display: inline-block;
			transform: translateY(0.15rem);
			margin-right: 0.2rem;
		}

		.top_title {
			font-size: 0.8rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: #222222;
			line-height: 1.1rem;
			max-height: 2.2rem;
			display: inline-block;
		}

		.title {
			text-overflow: -o-ellipsis-lastline;
			overflow: hidden;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-line-clamp: 2;
			line-clamp: 2;
			-webkit-box-orient: vertical;
		}

		.mid_decri {
			/*display: flex;*/
		}

		.mid_decri_item {

			padding: 0 0.1rem;
			height: 0.8rem;
			line-height: 0.8rem;
			border-radius: 0.1rem;
			border: 0.03rem solid rgba(0, 90, 147, 1);
			font-size: 0.5rem;
			border-radius: 0.1rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(0, 90, 147, 1);
			/*text-align: center;*/
			float: left;
			/* margin-top: 0.3rem; */
			margin-right: 0.25rem;
			
		
		}

		.clear {
			clear: both;
		}

		.now_price {
			font-size: 1.1rem;
			font-family: 'PingFangSC-Semibold';
			font-weight: 600;
			color: rgba(255, 102, 66, 1);
			line-height: 1rem;
		}

		.newest {
			padding: 0.75rem;
			padding-bottom: 0;
			/*border-bottom: 0.5rem solid rgba(246, 246, 246, 1);*/
			margin: 0.7rem;
			background-color: white;
			border-radius:8px;
			/*border: 1px solid black;*/
			display:flex;
			flex-wrap:wrap;
		}

		.newest_head {
			display: flex;
			/*border: 1px solid black;*/
			width: 16rem;
		}

		.headPortrait {
			width: 1.7rem;
			height: 1.7rem;
			margin-right: 0.3rem;
		}

		.headPortrait img {
			border-radius: 50%;
		}

		.newest_name_time {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: flex-start;
			margin-right: auto;
			/*margin-top: 0.55rem;*/
		}

		.newest_name {
			font-size: 0.7rem;
			font-family:PingFangSC-Medium,PingFang SC;
			font-weight: 500;
			color: rgba(46, 46, 46, 1));
			margin-bottom: 0.1rem;
		}

		.newest_time {
			font-size: 0.5rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(153, 153, 153, 1);
		}

		.more_circle{
			display: inline-block;
			width: 1rem;
			height: 1rem;
			/*margin-top: 0.55rem;*/
			/*padding-top: 0.5rem;*/
		}

		.newest_cont {
			width: 15.25rem;
			font-size: 0.8rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(34, 34, 34, 1);
			margin: 0.5rem 0 0.5rem 2.05rem;
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 2;
			overflow: hidden;
		}

		.newest_banner {
			margin-left: 2.05rem;
			display: flex;
			padding-bottom: 0.75rem;
			border-bottom: 0.05rem solid rgba(238, 238, 238, 0.5);
		}

		.newest_banner img {
			width: 4.95rem;
			height: 4.95rem;
			display: block;
			border-radius: 0.33rem;
			margin-right: 0.2rem;
		}

		.newest_banner_only {
			margin-left: 2.05rem;
			padding-bottom: 0.75rem;
			border-bottom: 0.05rem solid rgba(238, 238, 238, 0.5);
		}

		.newest_banner_only img {
			width: 15.25rem;
			height: 8.6rem;
			border-radius: 0.2rem;
			display: block;
		}

		#comment_wraper {
			border-top: 1px solid rgba(192, 192, 192, 0.2);
			display: flex;
			justify-content: space-around;
			margin-top: 0.5rem;
			/*margin-left: 0.5rem;*/
			width:100%
		}

		/*#comment_wraper>div {
			display: flex;
		}

		#comment_wraper>div img {
			width: 0.9rem;
			height: 0.85rem;
			margin-right: 0.15rem;
		}

		#comment_wraper>div span {
			font-size: 0.6rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(153, 153, 153, 1);
		}*/

		.latestRelease {
			border-bottom: 0.05rem solid rgba(238, 238, 238, 0.5);
			display: flex;
			align-items: center;
			padding: 0.75rem 0.75rem 0.9rem 0.75rem;
		}

		.latestRelease>div>div {
			display: flex;
			align-items: center;
		}

		.latestRelease>div>div img {
			width: 0.55rem;
			height: 0.6rem;
			margin-right: 0.25rem;
			font-size: 0.7rem;
		}

		.latestRelease_first {
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(187, 187, 187, 1);
		}

		.latestRelease_first_active {
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(34, 34, 34, 1);
		}

		.line_news {
			width: 0.05rem;
			height: 0.6rem;
			background: rgba(238, 238, 238, 1);
			margin-right: 0.75rem;
			margin-left: 0.75rem;
		}

		.latestRelease_second_active {
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(34, 34, 34, 1);
		}

		.latestRelease_second {
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(187, 187, 187, 1);
		}

		.seckill_header {
			display: flex;
			justify-content: center;
			align-items: center;
			padding: 1.05rem 0 0.55rem 0;
		}

		/*新加样式*/
		.nowPrice{
			font-family:PingFangSC-Regular,PingFang SC;
			font-weight:400;
			color:rgba(233,0,0,1);
			font-size: 1rem;
			margin-top: 0.3rem;
			line-height: 2rem;
		}
		.nowPriceimg{
			font-family:PingFangSC-Regular,PingFang SC;
			font-weight:400;
			color:rgba(233,0,0,1);
			font-size: 0.75rem;
			margin-top: 0.3rem;
			line-height: 2rem;
		}
		.oldPrice{
			font-family:PingFangSC-Regular,PingFang SC;
			font-weight:400;
			color:rgba(179,179,179,1);
			font-size: 0.6rem;
			margin-top: 0.3rem;
			line-height: 2rem;
		}
		.contTit{
			font-size:0.8rem;
			font-family:PingFangSC-Medium,PingFang SC;
			font-weight:500;
			color:rgba(46, 46, 46, 1);
			line-height:1rem;
			white-space: nowrap;
			text-overflow: ellipsis;
			overflow: hidden;
			/*padding-left: 0.5rem;*/
			width: 15.3rem;
			margin-top: 0.5rem;
			/*margin: 0.5rem 0 0.5rem 2rem;*/
			/*border: 1px solid black;*/
		}
		.contTxt {
			/*border: 1px solid black;*/
			/*margin: 0.5rem 0 0 0.6rem;*/
			overflow: hidden;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-line-clamp: 3;
			-webkit-box-orient: vertical;
			font-size: 0.7rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(128, 128, 128, 1);
			margin-top: 0.3rem;
			width: 100%;
			/*border: 1px solid black;*/

		}
		#comment_wraper{
			border-top: 1px solid rgba(192, 192, 192, 0.2);
			display: flex;
			justify-content: space-around;
			margin-top: 0.5rem;
			/*margin-left: 0.5rem;*/
		}
		.wraperImg{
			width: 0.8rem;
			height: 0.8rem;
		}
		.wraperSpan{
			font-family:PingFangSC-Regular,PingFang SC;
			font-weight:400;
			color: rgba(128, 128, 128, 1);
			display: inline-block;
			font-size: 0.65rem;
			line-height: 0.8rem;
			margin-left: 0.2rem;
		}
		.zanBox{
			/*border: 1px solid black;*/
			display: flex;
			justify-content: flex-start;
			padding: 0.2rem;
			margin: 0.35rem;
		}
		.pingBox{
			/*border: 1px solid black;*/
			display: flex;
			justify-content: flex-start;
			padding: 0.2rem;
			margin: 0.35rem;
			/*margin-left: 0.8rem;*/
		}
		.cangBox{
			/*border: 1px solid black;*/
			display: flex;
			justify-content: flex-start;
			padding: 0.2rem;
			margin: 0.35rem;
		}
		.imgBox{
			/*border-bottom: 1px solid rgba(238, 238, 238, 0.5);*/
			width: 15.5rem;
			/*height: 6rem;*/
			display: flex;
			/*justify-content:flex-start;*/
			flex-wrap:wrap;
			padding-bottom: 0.7rem;
			padding-top: 0.5rem;
			/*margin-left: 0.5rem;*/
			/*border: 1px solid black;*/
		}
		.imgItem{
			width: 30%;
			height: 4.5rem;
			background:rgba(216,216,216,1);
			border-radius:4px;
			/*margin: 0.2rem;*/
			margin-left: 0.3rem;
			margin-top: 0.2rem;

		}
		.imgItem img{
			border-radius:4px;
			width: 100%;
			height: 100%;
		}
	</style>
</head>

<body>
	<div id="app" v-cloak="">


		<!-- 商品栏 -->
		<div v-if="index=='good'">
			<div class="new_wraper">
				<div class="newproduct_list flex-box-x" v-for="(vo, index) in info" @touchstart="gtouchstart(vo.id,'good')" ontouchmove="gtouchmove()" ontouchend="gtouchend()" tapmode @click="openWin_goods_detail(vo.id)">
					<div class="left_img">
						<img :src="vo.cover" alt="">
					</div>
					<div class="right_cont col-xs-x">
						<!-- 商品内容 -->
						<div class="top_title title">
						{{vo.title}}
						</div>

						<div class="mid_decri" v-for="item in vo.service_name">
							<div class="mid_decri_item">{{item}}</div>
						</div>
						<section class="clear"></section>
						<div v-if="index == 0" v-for="(item,index) in vo.service_name">
							<span class="nowPriceimg">￥<span class="nowPrice">{{vo.current_price}}</span></span>
							<del class="oldPrice">￥{{vo.cost_price}}</del>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!--资讯-->
<!-- style="background-color:#ffffff;" -->
		<div v-if="index=='xx'">
			<div v-for="(vo,index) in info" class="newest">
					<div class="newest_head">
						<div class="headPortrait" tapmode @click="openWin_circle_details(vo.id)">
							<img :src="vo.avatar" />
						</div>
						<div class="newest_name_time" tapmode @click="openWin_circle_details(vo.id)">
							<div class="newest_name">
								{{vo.nickname}}
							</div>
							<div class="newest_time">
								{{vo.create_time}}
							</div>
						</div>

					</div>

					<!-- 内容-->
					<div class="contTit">
								{{vo.title}}
					</div>

					<div class="contTxt" @click="openWin_circle_details(vo.id,'资讯详情',index1)">
					{{vo.content}}
					</div>

					<div class="imgBox" v-if="vo.img" style="padding-bottom:0">
						<div v-for="item in vo.img" class="imgItem" tapmode @click="openWin_circle_details(vo.id)">
								<img :src="item"  />
						</div>
					</div>

					<!-- <div v-if="vo.cover">
						<div class="newest_banner_only" tapmode @click="openWin_circle_details(vo.id)">
							<div>
								<img :src="vo.cover"  />
							</div>
						</div>
					</div> -->

					<div calss=""  id="comment_wraper">
						<!-- 点赞 -->
						<div class="zanBox" tapmode @click="opera_data(1,vo.catid,vo.id,index,vo.is_zan)">
							<img v-if="vo.is_zan=='0'" src="../../image/icon/icon-zan.png"  class="wraperImg"/>
							<img v-if="vo.is_zan=='1'" src="../../image/icon/icon-zan-active.png"  class="wraperImg"/>

							<span class="wraperSpan">{{vo.zan_num}}</span>
						</div>

						<div class="pingBox" tapmode @click="openWin_circle_details(vo.id,'资讯详情',index)">
							<img src="../../image/icon/icon-comment.png"  class="wraperImg"/>

							<span class="wraperSpan">{{vo.comment_num}}</span>
						</div>

						<div class="cangBox" tapmode @click="opera_data(2,vo.catid,vo.id,index,vo.is_fav)">
							<img v-if="vo.is_fav=='0'" src="../../image/icon/icon-fav.png"  class="wraperImg"/>
							<img v-if="vo.is_fav=='1'" src="../../image/icon/icon-fav-active.png"  class="wraperImg"/>
							<span class="wraperSpan">{{vo.collect_num}}</span>
						</div>
					</div>

			</div>
		</div>

		<!--会员秀-->
		<div v-if="index=='xyx'">
			<div v-for="(vo,index) in info" v-if="vo.catid=='2'" class="newest" >

					<!-- 头像==昵称==时间 -->
					<div class="newest_head">
						<div class="headPortrait" tapmode @click="openWin_circle_details(vo.id)">
							<img :src="vo.avatar" />
						</div>
						<div class="newest_name_time" tapmode @click="openWin_circle_details(vo.id)">
							<div class="newest_name">
								{{vo.nickname}}
							</div>
							<div class="newest_time">
								{{vo.create_time}}
							</div>
						</div>

						<div @click="showmenu(vo.catid,vo.id,vo.uid)" class="more_circle" tapmode>
							<img style="width: 1.1rem;" src="../../image/icon/more.png" />
						</div>
					</div>

					<!-- 内容-->
					<div class="contTit">
						{{vo.title}}
					</div>

					<div class="contTxt" @click="openWin_circle_details(vo.id,'资讯详情',index1)">
					{{vo.content}}
					</div>
					<!-- <div v-html="vo.content.replace(/\n/g, '<br/>')" class="newest_cont" tapmode @click="openWin_circle_details(vo.id)" style="font-size:0.8rem;font-family:PingFangSC;font-weight:400;color:rgba(34,34,34,1);line-height:1.1rem;">
					</div> -->

					<!-- 图片 -->
					<div class="imgBox" v-if="vo.img" style="padding-bottom:0">
						<div v-for="item in vo.img" class="imgItem" tapmode @click="openWin_circle_details(vo.id)">
								<img :src="item"  />
						</div>
					</div>

					<!-- <div class="imgBox" v-if="vo.img.length > 0">
						<div class="imgItem" tapmode v-for="(item,index) in vo.img" :key="index" @click.stop="showimg(vo.img,index)">
							<img :src="item" />
						</div>
					</div> -->

					<!-- 转发-评论-点赞-收藏 -->
					<div calss=""  id="comment_wraper">
						<!-- 点赞 -->
						<div class="zanBox" tapmode @click="opera_data(1,vo.catid,vo.id,index,vo.is_zan)">
							<img v-if="vo.is_zan=='0'" src="../../image/icon/icon-zan.png"  class="wraperImg"/>
							<img v-if="vo.is_zan=='1'" src="../../image/icon/icon-zan-active.png"  class="wraperImg"/>

							<span class="wraperSpan">{{vo.zan_num}}</span>
						</div>

						<div class="pingBox" tapmode @click="openWin_circle_details(vo.id,'资讯详情',index)">
							<img src="../../image/icon/icon-comment.png"  class="wraperImg"/>

							<span class="wraperSpan">{{vo.comment_num}}</span>
						</div>

						<div class="cangBox" tapmode @click="opera_data(2,vo.catid,vo.id,index,vo.is_fav)">
							<img v-if="vo.is_fav=='0'" src="../../image/icon/icon-fav.png"  class="wraperImg"/>
							<img v-if="vo.is_fav=='1'" src="../../image/icon/icon-fav-active.png"  class="wraperImg"/>
							<span class="wraperSpan">{{vo.collect_num}}</span>
						</div>
					</div>


			</div>

		</div>

		<!-- 无收藏 -->
		<div v-if="info.length<1" class="aui-text-center" style="padding-top: 40%;padding-bottom:100%;display:inline-block;height:100%;width:100%;background-color:#fff;">
			<img src="../../image/bg/bg-collect.png" style="width:7.55rem;margin-left:50%;transform:translateX(-50%);margin-bottom:1.35rem" />
			<div class="aui-margin-t-10" style="font-size:.75rem;font-family:PingFangSC-Regular;font-weight:400;color:#B3B3B3;">
				您还没有收藏哦！
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/vue.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/aui-dialog.js"></script>
<script>
	var vm = new Vue({
		el: "#app",
		data: {
			index: 'good',
			page: 1,
			loadmore: true,
			info: []
		},
		methods: {
			get_list: function() {
				get_data('api/Opera/mylist', {
					token: $api.getStorage('token'),
					source: vm.index,
					page: vm.page
				}, function(ret) {
					console.log(JSON.stringify(ret));
					// alert(JSON.stringify(ret.status))
					if (ret.status) {
						if (ret.data.length < 20) {
							vm.loadmore = false
						}
						ret.data.forEach(function(el) {
							vm.info.push(el)
						})
					}
				})
			},
			price_format: function(type, price) {
				var status = (price + '').indexOf('.')
				if (status == '-1') {
					if (type == 'yuan') {
						return price;
					}
					if (type == 'fen') {
						return '00';
					}
				}
				var price_array = (price + '').split('.')
				if (type == 'yuan') {
					return price_array[0];
				}
				if (type == 'fen') {
					var price_fen = price_array[1].length < 2 ? price_array[1] + '0' : price_array[1];
					return price_fen;
				}
			}
		}
	})
	apiready = function() {
		vm.get_list();
		//			fnInitPullRefresh(function() {
		//				vm.info = [];
		//				vm.page = 1;
		//				vm.loadmore = true;
		//				vm.get_list();
		//			})
		fnInitScrollToBottom(function() {
			if (vm.loadmore) {
				vm.page++;
				vm.get_list();
			}
		})
		add_event('fav_ref', function(ret) {
			vm.info = [];
			vm.page = 1;
			vm.loadmore = true;
			vm.get_list();
		})
		//首页顶部最新按钮跟点赞数按钮点击时触发
		add_event('fav_index', function(ret) {
			vm.index = ret.index
			vm.info = [];
			vm.page = 1;
			vm.loadmore = true
			vm.get_list()
		})
	};

	function tapindex(index) {
		if (vm.index != index) {
			vm.index = index
			vm.info = [];
			vm.page = 1;
			vm.loadmore = true;
			vm.get_list();
		}
	}
	var timeOutEvent = 0;

	function gtouchstart(id, source) {
		timeOutEvent = setTimeout(function() {
			longPress(id, source)
		}, 500);
		return false;
	};

	function gtouchend() {
		clearTimeout(timeOutEvent);
		if (timeOutEvent != 0) {
			//这里写要执行的内容（尤如onclick事件）
			//			console.log("你这是点击，不是长按");
		}
		return false;
	};

	function gtouchmove() {
		clearTimeout(timeOutEvent);
		timeOutEvent = 0;
	};

	function longPress(id, source) {
		timeOutEvent = 0;
		//执行长按要执行的内容，如弹出菜单
		del(id, source)
	}

	function del(id, source) {
		var dialog = new auiDialog();
		dialog.alert({
			title: "提示",
			msg: '确定要取消收藏吗？',
			buttons: ['取消', '确定']
		}, function(ret) {
			if (ret) {
				if (ret.buttonIndex == '2') {
					opera(id, source, 2, function(ret) {
						if (ret.status) {
							toast('取消收藏成功')
							vm.info = [];
							vm.page = 1;
							vm.loadmore = true;
							vm.get_list();
						}
					})
				}
			}
		})
	}
	//点赞方法
	function opera_data(type, catid, id, index, status) {
		var source = catid == '1' ? 'xx' : 'xyx'
		opera(id, source, type, function(ret) {
			if (ret.status) {
				//点赞
				if (type == '1' && status == '1') {
					toast('取消点赞成功')
					vm.info[index].is_zan = '0'
					vm.info[index].zan_num = parseInt(vm.info[index].zan_num) - 1;
				}
				if (type == '1' && status == '0') {
					toast('点赞成功')
					vm.info[index].is_zan = '1'
					vm.info[index].zan_num = parseInt(vm.info[index].zan_num) + 1;
				}
				if (type == '2' && status == '1') {
					toast('取消收藏成功')
					vm.info = [];
					vm.page = 1;
					vm.loadmore = true;
					vm.get_list();
				}
				if (type == '2' && status == '0') {
					toast('收藏成功')
					vm.info[index].is_fav = '1'
				}
			}
		})
	}
</script>

</html>
